How to perform trigonometry function in c